import request from '@/utils/request'

// 查询分站列表
export function listSubstation(query) {
  return request({
    url: '/fenzhan/substation/list',
    method: 'get',
    params: query
  })
}

// 查询分站详细
export function getSubstation(substationId) {
  return request({
    url: '/fenzhan/substation/' + substationId,
    method: 'get'
  })
}

// 新增分站
export function addSubstation(data) {
  return request({
    url: '/fenzhan/substation',
    method: 'post',
    data: data
  })
}

// 修改分站
export function updateSubstation(data) {
  return request({
    url: '/fenzhan/substation',
    method: 'put',
    data: data
  })
}

// 删除分站
export function delSubstation(substationId) {
  return request({
    url: '/fenzhan/substation/' + substationId,
    method: 'delete'
  })
}

// 导出分站
export function exportSubstation(query) {
  return request({
    url: '/fenzhan/substation/export',
    method: 'get',
    params: query
  })
}
